package cz.khfotbal.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "SEASON_COMPETION_TEAM_MATCH")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class SeasonCompetionTeamMatch {

	@Id
	@GeneratedValue
	private int id;

	@Column(nullable = true)
	private Integer goals;

	private Integer homeTeam;

	@ManyToOne
	@JoinColumn(name = "SEASON_COMPETION_TEAM_ID")
	private SeasonCompetionTeam seasonCompetionTeam;

	@ManyToOne
	@JoinColumn(name = "MATCH_ID")
	private Match match;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public SeasonCompetionTeam getSeasonCompetionTeam() {
		return seasonCompetionTeam;
	}

	public void setSeasonCompetionTeam(SeasonCompetionTeam seasonCompetionTeam) {
		this.seasonCompetionTeam = seasonCompetionTeam;
	}

	public Match getMatch() {
		return match;
	}

	public void setMatch(Match match) {
		this.match = match;
	}

	public Integer getGoals() {
		return goals;
	}

	public void setGoals(Integer goals) {
		this.goals = goals;
	}

	public Integer getHomeTeam() {
		return homeTeam;
	}

	public void setHomeTeam(Integer homeTeam) {
		this.homeTeam = homeTeam;
	}

}
